"""
BPF_PERCPU_ARRAY(log_message_cache, struct log_message, 1);
BPF_PERCPU_ARRAY(class_new_event_event_cache, struct class_new_event_event, 1);
BPF_PERCPU_ARRAY(class_delete_event_cache, struct class_delete_event, 1);
"""
from ctypes import *

from GlobalVariableodule import GlobalVariableodule

class LogMessageKernel(Structure):
    _fields_ = [("message_id", c_uint64),
                ("message", c_char * GlobalVariableodule.FILE_NAME_MAX)]


class ClassModifyEventKernel(Structure):
    _fields_ = [("db_update_event_id", c_uint64),
                ("need_modify_class_id", c_int),
                ("is_add", c_int),
                ("operand", c_int),
                ]


class ClassNewEventKernel(Structure):
    _fields_ = [("db_update_event_id", c_uint64),
                ("file_path", (c_char * GlobalVariableodule.FILE_NAME_MAX) * GlobalVariableodule.MAX_FOLDER_DEPTH),
                ("Creator_class_id", c_int),
                ("new_class_id", c_int),
                ]

class ClassDeleteEventKernel(Structure):
    _fields_ = [("db_update_event_id", c_uint64),
                ("file_path", (c_char * GlobalVariableodule.FILE_NAME_MAX) * GlobalVariableodule.MAX_FOLDER_DEPTH),
                ]